<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>

		<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
	</head>
	<body>
		<div id="app">
			<like-list :hobbies="likes" :person="p"></like-list>
		</div>

		<script>
			var app = Vue.createApp({
				data() {
					return {
						"likes": [
							"唱歌","跳舞","打球"
						],
						'p':{
							'name':'曹操',
							'age':48
						}
						
					}
				}
			});
			app.component("like-list", {
				template: "{{person.name}}{{person.age}}<div v-for='l in hobbies'>{{l}}</div>",
				props: ['hobbies','person']
			})

			var vm = app.mount("#app")
		</script>



	</body>
</html>